<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>GraphPaths:  File sorgente src/grafo.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">GraphPaths
   &#160;<span id="projectnumber">1</span>
   </div>
   <div id="projectbrief">Creazione di grafi e calcolo dei percorsi minimi</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generato da Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Cerca');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Pagina&#160;Principale</span></a></li>
      <li><a href="annotated.html"><span>Classi</span></a></li>
      <li class="current"><a href="files.html"><span>File</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Cerca" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Elenco&#160;dei&#160;file</span></a></li>
      <li><a href="globals.html"><span>Elementi&#160;dei&#160;file</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tutto</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classi</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>File</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funzioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variabili</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Ridefinizioni di tipo (typedef)</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Definizioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pagine</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">grafo.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="src_2grafo_8h.html">Vai alla documentazione di questo file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef GRAFO_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GRAFO_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;fstream&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;cassert&gt;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="src_2nodo_8h.html">nodo.h</a>&quot;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="src_2arco_8h.html">arco.h</a>&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;glib.h&gt;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="keyword">using namespace </span>std;</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="classGrafo.html">   14</a></span>&#160;<span class="keyword">class </span><a class="code" href="classGrafo.html">Grafo</a> : <span class="keyword">public</span> <a class="code" href="classElemento__ui.html">Elemento_ui</a></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;{</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;      <a class="code" href="classGrafo.html">Grafo</a>();</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;      <span class="keyword">virtual</span> ~<a class="code" href="classGrafo.html">Grafo</a>();</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;      </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;      <span class="keywordtype">void</span> inizializza();</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;      </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;      <a class="code" href="classElemento__ui.html">Elemento_ui</a>* find_by_xy(gdouble x, gdouble y);</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;      </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;      <span class="keywordtype">void</span> seleziona(<a class="code" href="classNodo.html">Nodo</a> *<a class="code" href="classnodo.html">nodo</a>);</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;      </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;      <span class="keywordtype">void</span> seleziona(gdouble x, gdouble y);</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;      </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;      <a class="code" href="classNodo.html">Nodo</a>* get_selezionato();</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;      </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;       <a class="code" href="classNodo.html">Nodo</a>* aggiungi_nodo(gdouble x, gdouble y);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;      </div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;       </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;      <span class="keywordtype">void</span> aggiungi_arco(<a class="code" href="classNodo.html">Nodo</a>* destinazione);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;          </div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;      <span class="keywordtype">void</span> lmb_premuto(gdouble x, gdouble y);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;      </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;      <span class="keywordtype">void</span> lmb_rilasciato();        </div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;      </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;      gboolean is_dragging();     </div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classGrafo.html#a2d5146338fc22682bfb5446e2b591e03">   83</a></span>&#160;      GSList* <a class="code" href="classGrafo.html#a2d5146338fc22682bfb5446e2b591e03">get_nodi</a>() { <span class="keywordflow">return</span> nodi; }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;      </div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classGrafo.html#a80e182cbee0ee8020fdd8dbfb0faf81e">   88</a></span>&#160;      GSList* <a class="code" href="classGrafo.html#a80e182cbee0ee8020fdd8dbfb0faf81e">get_archi</a>() {<span class="keywordflow">return</span> lista_adiacenze; }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;      </div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      <span class="keywordtype">void</span> prepara();</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;      </div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;      guint get_numero_nodi();</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;      </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;      <span class="keywordtype">void</span> salva(<span class="keyword">const</span> <span class="keywordtype">char</span>* file);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;      </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;      <span class="keywordtype">void</span> <a class="code" href="backup_2main_8cc.html#a2695afd8cb4242971912f7cce63c3f27">carica</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* file);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;      </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;      <span class="keyword">virtual</span> <span class="keywordtype">void</span> draw(cairo_t* &amp;cr);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;      <span class="keyword">virtual</span> <span class="keywordtype">void</span> update(gdouble x, gdouble y);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <a class="code" href="classNodo.html">Nodo</a>* selezionato; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <a class="code" href="classArco.html">Arco</a>* arco_selezionato; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        guint indice_corrente; </div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        GSList* nodi; </div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        GSList* lista_adiacenze; </div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <a class="code" href="classNodo.html">Nodo</a>* find_by_index(guint indice); </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        <span class="keywordtype">void</span> deseleziona_nodi(); </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="keywordtype">void</span> carica_elemento(istream &amp;ifs); </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        gboolean is_lmb_pressed; </div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        gdouble mouse_origin_x; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        gdouble mouse_origin_y; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;};</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor">#endif // GRAFO_H</span></div>
<div class="ttc" id="classElemento__ui_html"><div class="ttname"><a href="classElemento__ui.html">Elemento_ui</a></div><div class="ttdef"><b>Definition:</b> elemento_ui.h:7</div></div>
<div class="ttc" id="src_2nodo_8h_html"><div class="ttname"><a href="src_2nodo_8h.html">nodo.h</a></div></div>
<div class="ttc" id="classArco_html"><div class="ttname"><a href="classArco.html">Arco</a></div><div class="ttdef"><b>Definition:</b> arco.h:7</div></div>
<div class="ttc" id="classNodo_html"><div class="ttname"><a href="classNodo.html">Nodo</a></div><div class="ttdef"><b>Definition:</b> nodo.h:10</div></div>
<div class="ttc" id="classGrafo_html_a2d5146338fc22682bfb5446e2b591e03"><div class="ttname"><a href="classGrafo.html#a2d5146338fc22682bfb5446e2b591e03">Grafo::get_nodi</a></div><div class="ttdeci">GSList * get_nodi()</div><div class="ttdef"><b>Definition:</b> grafo.h:83</div></div>
<div class="ttc" id="backup_2main_8cc_html_a2695afd8cb4242971912f7cce63c3f27"><div class="ttname"><a href="backup_2main_8cc.html#a2695afd8cb4242971912f7cce63c3f27">carica</a></div><div class="ttdeci">void carica(GtkWidget *widget)</div><div class="ttdef"><b>Definition:</b> main.cc:106</div></div>
<div class="ttc" id="classnodo_html"><div class="ttname"><a href="classnodo.html">nodo</a></div><div class="ttdef"><b>Definition:</b> nodo.h:10</div></div>
<div class="ttc" id="classGrafo_html"><div class="ttname"><a href="classGrafo.html">Grafo</a></div><div class="ttdef"><b>Definition:</b> grafo.h:14</div></div>
<div class="ttc" id="src_2arco_8h_html"><div class="ttname"><a href="src_2arco_8h.html">arco.h</a></div></div>
<div class="ttc" id="classGrafo_html_a80e182cbee0ee8020fdd8dbfb0faf81e"><div class="ttname"><a href="classGrafo.html#a80e182cbee0ee8020fdd8dbfb0faf81e">Grafo::get_archi</a></div><div class="ttdeci">GSList * get_archi()</div><div class="ttdef"><b>Definition:</b> grafo.h:88</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generato Mar 1 Lug 2014 08:14:03 per GraphPaths da &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
